net.rim.device.api.synchronization
Class SyncManager
java.lang.Object
net.rim.device.api.synchronization.SyncManager
public abstract class SyncManager
- extends Object
Handles all synchronization and backup/restore activity for the system.
NOTE: this class is not intended to be subclassed outside the BlackBerry
framework, as its public interface is subject to change (including the
addition of new abstract methods).
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
Method Summary |
|
abstract void |
addSyncEventListener(SyncEventListener listener)
Adds a SyncEventListener interested in events from the
synchronization manager. |
|
abstract void |
allowOTASync(SyncCollection collection,
boolean allow)
Allow or disallow OTA synchronization for an already registered SyncCollection. |
|
abstract void |
disableSynchronization(SyncCollection collection)
Disable synchronization for the given SyncCollection. |
|
abstract void |
enableOTASync(boolean enable)
Enables or disables OTA synchronization for all registered collections. |
|
abstract void |
enableSynchronization(SyncCollection collection)
Enable synchronization for the given SyncCollection. |
|
abstract void |
enableSynchronization(SyncCollection collection,
boolean allowOTASync)
Enable synchronization for the given SyncCollection. |
|
abstract void |
enableSynchronization(SyncCollection collection,
boolean allowOTASync,
int itPolicyTagForDisablingOTASync)
Enable synchronization for the given SyncCollection. |
|
static SyncManager |
getInstance()
Get the system-wide SyncManager instance. |
|
abstract String |
getLocalizedCollectionName(long sid,
String name,
Locale locale)
Return the localized name for the specified collection name |
|
abstract boolean |
isCollectionRegistered(SyncCollection collection,
boolean checkOTA,
boolean checkSerial)
Determine if a collection is registered for OTA synchronization or serial synchronization |
|
abstract boolean |
isCollectionResetSupported()
Determine if collection reset events are handled by the sync agent. |
|
abstract boolean |
isOTASyncAvailable(SyncCollection collection,
boolean checkAllow)
Determine if OTA sync is available for a SyncCollection based on all
the applicable criteria including IT policy, whether or not OTA sync
has been disallowed, and server configuration. |
|
abstract boolean |
isSerialSyncInProgress()
Return whether or not a serial sync or backup/restore is in progress. |
|
abstract boolean |
isSyncCompleted(SyncCollection collection)
Return true if the Sync is completed for the Sync Collection provided |
|
abstract void |
removeSyncEventListener(SyncEventListener listener)
Removes a SyncEventListener interested in events from the
synchronization manager. |
|
abstract void |
syncImmediately(SyncCollection collection)
Flush pending information. |
|
abstract void |
triggerSlowSync(SyncCollection collection)
Trigger Slow Sync on a collection. |
getInstance
public static SyncManager getInstance()
- Get the system-wide SyncManager instance.
- Returns:
- The system-wide SyncManager instance, or null if no SyncManager exists.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
enableSynchronization
public abstract void enableSynchronization(SyncCollection collection)
- Enable synchronization for the given SyncCollection. This method registers a collection for
synchronization; serially at first and then wirelessly if the collection implements the OTASyncCapable
interface when a SYNC service record is injected.
- Parameters:
collection
- The SyncCollection to enable synchronization for.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
enableSynchronization
public abstract void enableSynchronization(SyncCollection collection,
boolean allowOTASync)
- Enable synchronization for the given SyncCollection. This method registers a collection for
synchronization; serially at first and then wirelessly if the collection implements the OTASyncCapable
interface when a SYNC service record is injected.
- Parameters:
collection
- The SyncCollection to enable synchronization for.allowOTASync
- true to allow OTA synchronization; false to disallow it.
This parameter is ignored if the collection is not OTASyncCapable.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
enableSynchronization
public abstract void enableSynchronization(SyncCollection collection,
boolean allowOTASync,
int itPolicyTagForDisablingOTASync)
- Enable synchronization for the given SyncCollection.
- Parameters:
collection
- The SyncCollection to enable synchronization for.allowOTASync
- true to allow OTA synchronization; false to disallow it.
This parameter is ignored if the collection is not OTASyncCapable.itPolicyTagForDisablingOTASync
- The tag for IT policy that controls
whether or not wireless sync is disabled.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
disableSynchronization
public abstract void disableSynchronization(SyncCollection collection)
- Disable synchronization for the given SyncCollection.
- Parameters:
collection
- The SyncCollection to disable synchronization for.
- Throws:
IllegalArgumentException
- if the collection is null
.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
allowOTASync
public abstract void allowOTASync(SyncCollection collection,
boolean allow)
- Allow or disallow OTA synchronization for an already registered SyncCollection. Tells a
registered collection to allow or disallow wireless synchronization.
- Parameters:
collection
- The SyncCollection to enable synchronization for.allow
- true to allow OTA synchronization; false to disallow it.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
isOTASyncAvailable
public abstract boolean isOTASyncAvailable(SyncCollection collection,
boolean checkAllow)
- Determine if OTA sync is available for a SyncCollection based on all
the applicable criteria including IT policy, whether or not OTA sync
has been disallowed, and server configuration.
- Parameters:
collection
- The collection to check wireless sync availability for.checkAllow
- true to include whether or not OTA sync has been
allowed/disallowed in the check; false to exclude it.
- Returns:
- true if OTA sync is available for the collection; false otherwise.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
enableOTASync
public abstract void enableOTASync(boolean enable)
- Enables or disables OTA synchronization for all registered collections.
- Parameters:
enable
- true to enable OTA synchronization; false to disable it.
- Throws:
ControlledAccessException
- if the calling process does not have the necessary permissions to perform
this operation- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
addSyncEventListener
public abstract void addSyncEventListener(SyncEventListener listener)
- Adds a
SyncEventListener
interested in events from the
synchronization manager.
- Parameters:
listener
- The SyncEventListener
to add.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
removeSyncEventListener
public abstract void removeSyncEventListener(SyncEventListener listener)
- Removes a
SyncEventListener
interested in events from the
synchronization manager.
- Parameters:
listener
- The SyncEventListener
to remove.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
syncImmediately
public abstract void syncImmediately(SyncCollection collection)
- Flush pending information. Invoke this method to instruct SyncManager
to sync any pending changes related to a SyncCollection
- Parameters:
collection
- The SyncCollection to sync.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
isCollectionResetSupported
public abstract boolean isCollectionResetSupported()
- Determine if collection reset events are handled by the sync agent. A prerequisite is support
on the sync server for handling a delete-on-slow sync initialization requests where unmatched
server records are deleted.
- Returns:
- True if resets are handled, false if they are ignored.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.1.0
isSyncCompleted
public abstract boolean isSyncCompleted(SyncCollection collection)
- Return true if the Sync is completed for the Sync Collection provided
- Parameters:
collection
- The SyncCollection to check.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
triggerSlowSync
public abstract void triggerSlowSync(SyncCollection collection)
- Trigger Slow Sync on a collection. Invoke this method to instruct SyncManager
to start slow sync on the Sync Collection.
- Parameters:
collection
- The Sync Collection to start slow sync on it.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
isSerialSyncInProgress
public abstract boolean isSerialSyncInProgress()
- Return whether or not a serial sync or backup/restore is in progress.
- Returns:
- true if a serial sync is in progress; false otherwise.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
getLocalizedCollectionName
public abstract String getLocalizedCollectionName(long sid,
String name,
Locale locale)
- Return the localized name for the specified collection name
- Parameters:
sid
- the identifier of the servicename
- the original namelocale
- the locale
- Returns:
- the localized name, or the original name if the localized name cannot be determined.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.3.0
isCollectionRegistered
public abstract boolean isCollectionRegistered(SyncCollection collection,
boolean checkOTA,
boolean checkSerial)
- Determine if a collection is registered for OTA synchronization or serial synchronization
- Parameters:
collection
- SyncCollection to determine registration oncheckOTA
- true if OTA syncrhonization is to be checkedcheckSerial
- true if serial sycnrhonization is to be checked
- Returns:
- true if the collection is registered for syncrhonization
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.5.0
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal